package jxc.base.helper;

import javax.servlet.http.HttpServletRequest;
import eu.web.security.access.IdentityFetcher;

import jxc.data.hibernate.pojo.Operator;

/**
 * 安全辅助类,用户获取当前用户,检测用户权限
 * @author WZZ
 *
 */
public class UserAuthenticator {
	
	/**
	 * 获取当前用户
	 * @param r
	 */
	public static Operator getUser(HttpServletRequest r){
		return  (Operator) IdentityFetcher.fetch(r).getUser();
	}
}
